import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home.vue'
import category from '@/components/category.vue'
import cart from '@/components/cart.vue'
import center from '@/components/center.vue'
import detail from '@/components/goods/detail.vue'
import list from '@/components/goods/productList.vue'
import appraise from'@/components/center/appraise.vue'
import payment from '@/components/center/payment.vue'
import receive from '@/components/center/receive.vue'
import member from '@/components/center/member.vue'
import confirm from '@/components/shopcar/confirm.vue'
import pay from '@/components/shopcar/pay.vue'
import notFound from '@/components/notFound.vue'
Vue.use(Router)

export default new Router({
  linkActiveClass:'mui-active',
  routes: [
    {path: '/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/category',component:category},
    {path:'/cart',component:cart},
    {path:'/center',component:center,children:[
      {path:'/',component:member},
      {path:'/appraise',component:appraise},
      {path:'/payment',component:payment},
      {path:'/receive',component:receive}
    ]},
    {path:'/detail',component:detail},
    {path:'/list',component:list},
    {path:'/confirm',component:confirm},
    {path:'/pay',component:pay},
    {path:'*',component:notFound}
  ]
})
